<script setup lang="ts">
import { defineComponent, reactive, ref } from "vue";
import NewTag from "@/components/NewTag/NewTag.vue";
import { routeOut } from "@/views/home/home";

defineComponent({
  name: "ReBanner"
});

const props = defineProps({
  menu: {},
  currentVideo: {
    type: Object
  }
});
</script>

<template>
  <div class="banner">
    <div
      class="banner-background"
      :style="`background-image: url('${currentVideo?.banner.url}')`"
    />
    <div class="banner-info">
      <div class="banner-title">
        {{ currentVideo?.title }}
      </div>
      <NewTag :label="currentVideo?.area[0].name" />
      <NewTag
        v-if="currentVideo && currentVideo.language"
        :label="currentVideo?.language[0].name"
      />
      <NewTag :label="currentVideo?.type[0].name" />
      <NewTag :label="currentVideo?.remark" />
      <div class="banner-desc">
        {{ currentVideo?.desc }}
      </div>
      <div class="play-button" @click="routeOut(currentVideo)">
        <IconifyIconOnline
          style="
            margin: 0;
            display: inline-block;
            width: 20px;
            height: 20px;
            position: absolute;
            left: 18px;
            top: 10px;
          "
          icon="solar:play-bold"
        />
        播放
      </div>
    </div>
  </div>
</template>

<style scoped lang="css">
.banner {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  box-shadow: inset rgba(0, 0, 0, 0.6) -50px -50px 40px 20px;
}

.banner-background {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-size: 100% 100%;
  z-index: 0;
}

.banner-info {
  position: absolute;
  left: 90px;
  bottom: 18vw;
  min-width: 400px;
  width: 30%;
  height: 200px;
  color: rgba(210, 210, 210);
}

.banner-title {
  font-size: var(--newcms-font-size-main-title);
  font-family: shtgzhk, serif;
}

.banner-desc {
  font-size: var(--newcms-font-size-desc);
  font-family: 微软雅黑, serif;
  margin: 5px 0;
  text-indent: 2em;
}
.play-button {
  position: relative;
  width: 100px;
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
  height: 40px;
  line-height: 40px;
  padding-left: 43px;
  font-size: 17px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 300ms;
  margin: 20px 0;
}
.play-button:hover {
  color: #0f0303;
  background-color: rgba(255, 255, 255, 0.8);
}
</style>
